In computer science, a virtual machine (VM) is a portion of software that, when executed on appropriate hardware, creates an environment allowing the virtualization of an actual physical computer system. Each VM may function as a self-contained platform, running its own operating system (OS) and software applications (processes). Typically, a virtual machine monitor (VMM) manages allocation and virtualization of computer resources and performs context switching, as may be necessary, to cycle between various VMs.
A host machine (e.g., computer or server) is typically enabled to simultaneously run multiple VMs, where each VM may be used by a local or remote user. The host machine allocates a certain amount of the host's resources to each of the VMs. Each VM is then able to use the allocated resources to execute applications, including operating systems known as guest operating systems. The VMM virtualizes the underlying hardware of the host machine or emulates hardware devices, making the use of the VM transparent to the guest operating system or the the user of the VM.
Recently, solutions providing centralized hosting for VMs that run (virtual) desktops have been developed. Such solutions consist of centralized servers that are partitioned into multiple VMs that host the VMs, thereby providing a desktop for each user. The centralized hosting provides the manageability of sever-based computing, while the dedicated environment provides the flexibility and compatibility with applications that a desktop enables.
However, one problem that arises with centralized hosting of VMs is that it demands large allocation of storage for all of the VMs. Such large allocation of storage is especially painful when there are many VMs being hosted, a common scenario in desktop virtualization. In order to deal with this problem, sparse storage allocation solutions have been developed to address the problem.
With a sparse storage allocation solution, each VM is allocated some minimum storage space out of the shared pool of storage. The storage allocation per VM is usually a small amount that is allocated on-demand; rather than allocating to each VM the maximum amount of storage that the VM may use. Virtualization systems require storage allocation in this sparse manner in order to conserve disk space for use only by VM systems that require the storage.
During VM execution, more disk space is generally allocated on-the-fly as needed. However, under this system, a VM will most likely reach a certain point where it has utilized all available disk space that it has been allocated. At this point, conventional systems require some sort of human interaction to stop the VM, adjust the storage allocation to the VM, and may even require restarting the VM. Furthermore, if the VM is not stopped when it runs out of storage, then additional problems may occur, such as guest fs confusion/recovery, high CPU usage, and so on. Such manual interaction and other resulting problems are costly in terms of overhead and time-consuming in terms of performance. As such, a mechanism for automatic adjustment of virtual machine storage without manual user intervention would be beneficial.